package com.tencent.wxcloudrun.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tencent.wxcloudrun.dao.OrderGoodsMapper;
import com.tencent.wxcloudrun.dao.OrderRechargeMapper;
import com.tencent.wxcloudrun.model.OrderGoodsReq;
import com.tencent.wxcloudrun.model.OrderRecharge;
import com.tencent.wxcloudrun.model.OrderRechargeReq;
import com.tencent.wxcloudrun.model.PayReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: OrderRechargeService
 * Package: com.tencent.wxcloudrun.service
 * Description:
 *
 * @Date: 2023/1/23 2:04 PM
 * @Author: wht
 */
@Slf4j
@Service
public class OrderRechargeService {
    @Autowired
    OrderRechargeMapper orderRechargeMapper;

    public PageInfo getOrderRechargeList(OrderRechargeReq req) {
        PageHelper.startPage(req.getPageNum(), req.getPageSize());
        PageHelper.orderBy("id");
        List<OrderRecharge> orderGoodsList = orderRechargeMapper.getOrderRechargeList(req);
        PageInfo<OrderRecharge> pageInfo = new PageInfo<>(orderGoodsList);
        return pageInfo;
    }

}
